* Define program to perform nonlinear transformations of soils
capture program drop soils_tranform
program define soils_tranform
	fp gen slope^(0 0 .5 1 2), replace
	fp gen om^(0 0 .5 1 2), replace 
	fp gen cec7^(0 0 .5 1 2), replace   
	fp gen ksat^(0 0 .5 1 2), replace
	fp gen clay_perc^(0 0 .5 1 2), replace
	fp gen silt_perc^(0 0 .5 1 2), replace
	fp gen bulkDensity^(0 0 .5 1 2), replace 
	fp gen soc0_150^(0 0 .5 1 2), replace 
	fp gen rootznemc^(0 0 .5 1 2), replace 
	* Variables that include zero. Do not include log
	fp gen sar^(.5 1 2), catzero replace
	fp gen gypsum^(.5 1 2), catzero replace
	fp gen ec^(.5 1 2), catzero replace
	fp gen ph_less6^(.5 1 2), catzero replace
	fp gen ph_greater7dot5^(.5 1 2), catzero replace
	fp gen hydgrp_D^(.5 1 2), catzero replace
	fp gen hydgrp_A_AD^(.5 1 2), catzero replace
	fp gen hydgrp_B_BD^(.5 1 2), catzero replace
	fp gen hydgrp_C_CD^(.5 1 2), catzero replace
	fp gen text_sandy^(.5 1 2), catzero replace
	fp gen text_mod_sandy^(.5 1 2), catzero replace
	fp gen text_medium^(.5 1 2), catzero replace
	fp gen text_mod_clay^(.5 1 2), catzero replace
	fp gen text_clay^(.5 1 2), catzero replace
end
